<?php
    require_once('D:/Programme/Xampp/htdocs/Game/includes/Init.php');
    echo $_SERVER['DOCUMENT_ROOT'];
    $at = Controller::getActionTemplate();
    $queryPicture = $_POST['q'];
// 	$myFile = "../test.txt";
// 	$fh = fopen($myFile, 'a') or die("can't open file");
    if(!empty($queryPicture)) {
//         ob_start();
//         print_r($var1);
//         $text = ob_get_clean();
//         fwrite($fh, "\n-------\n" . $text);
//         fclose($fh);
        $at->assign('bigFile', $queryPicture);
        echo $at->fetch("mainBig.tpl");
    } else {
        $getFiles = new GetFiles();
        $getFiles->getAllGaleriaFiles();
        //echo "";
        echo $at->fetch("galeria.tpl");
    }
